//
//  UIView+Kit.m
//  demo
//
//  Created by iMac on 2019/5/27.
//  Copyright © 2019年 iMac. All rights reserved.
//

#import "UIView+Kit.h"

@implementation UIView (Kit)

- (UIImage *)screenshots
{
    UIGraphicsBeginImageContext(self.bounds.size);
    CGContextRef context = UIGraphicsGetCurrentContext();
    [self.layer renderInContext:context];
    UIImage *img = UIGraphicsGetImageFromCurrentImageContext();
    UIGraphicsEndImageContext();
    return img;
}

@end
